<template>
	<view class="content">
		<image class="logo" src="/static/logo.png"></image>
		<view class="uni-flex uni-column">
			<view class="flex-item flex-item-V uni-bg-red">
				<text class="title" @click="hello">{{title}}</text>
			</view>
			<view class="flex-item flex-item-V uni-bg-red">
				<text class="title">({{long}},{{lati}})</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				long: '',
				lati: ''
			}
		},
		onLoad() {
			this.hello()
		},
		methods: {
			hello() {
				let _this = this;
				console.log("hello click")
				uni.getLocation({
					type: 'wgs84',
					success: function (res) {
						_this.long = res.longitude;
						_this.lati = res.latitude;
						console.log(res.longitude);
						console.log(res.latitude);
					},
					fail: function(e) {
						_this.long = "111.11";
						_this.lati = "33.33";
						console.log(e)
					}
				});
			}
		}
	}
</script>

<style scoped>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
	.flex-item {
		width: 33.3%;
		height: 200rpx;
		text-align: center;
		line-height: 200rpx;
	}
	
	.flex-item-V {
		width: 100%;
		height: 150rpx;
		text-align: center;
		line-height: 150rpx;
	}
	
	.text {
		margin: 15rpx 10rpx;
		padding: 0 20rpx;
		background-color: #ebebeb;
		height: 70rpx;
		line-height: 70rpx;
		text-align: center;
		color: #777;
		font-size: 26rpx;
	}
	
	.desc {
		/* text-indent: 40rpx; */
	}
	.flex-pc {
		display: flex;
		justify-content: center;
	}
</style>
